#! /usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) JoinQuant Development Team
# Author: Huayong Kuang <kuanghuayong@joinquant.com>

cdef extern from "cfib.h":
    double cfib(int n)


def fib(n):
    """Returns the nth Fibonacci number."""
    return cfib(n)
